home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / LLIST.ZIP / LISTLIST.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-26  |  22.9 KB  |  754 lines

  1. /* ------------------------------------------------------------------------------
  2. | FILE NAME: ListList.h
  3. |
  4. | DOCUMENT: [186.5]
  5. |
  6. | PURPOSE: To permit use of list system functions by other programs.
  7. |
  8. | DESCRIPTION: A list of extern prototypes in #include-able format.
  9. |
  10. | NOTE: 
  11. |
  12. | HISTORY:  01.12.89 Created by Lee Malone
  13. |           01.30.89 Added SortListAlphabetically
  14. |           02.01.89 Added Item, LIST structs
  15. |           02.02.89 Added DeleteAllItemsFromAListThatMatchAAddressOfData
  16. |           02.16.89 Split of stack functions to stacks.h
  17. |           03.07.89 Added , Byte->Byte, Truth->Truth
  18. |           07.09.89 Changed structure of LIST and Item -- added status field, 
  19. |                    datatype field, name field
  20. |           07.11.89 Added Name field to Item
  21. |           10.11.89 Remove Name fields and DataTypeID fields
  22. |           02.03.93 Copied from lists.h
  23. |           10.25.93 Revised to conform to Focus usage.
  24. |           11.22.93 Release 5.0
  25. |----------------------------------------------------------------------------- */
  26.  
  27. #ifndef _LISTS_H_
  28. #define _LISTS_H_
  29.  
  30. #include <DataSize.h>
  31.  
  32. #include <stdio.h>
  33. #include <stdlib.h>
  34. #include <ctype.h>
  35.  
  36. #include "Strings.h"
  37.  
  38. /*************************************************************/
  39. /*               T H E   I T E M   R E C O R D               */
  40. /*************************************************************/
  41.  
  42. typedef struct ItemRecord
  43. {
  44.     struct ItemRecord   *AddressOfNextItem;
  45.     
  46.     struct ItemRecord   *AddressOfPriorItem;
  47.     
  48.     AddressOfByte       AddressOfData; /* Where the data is for this item. */
  49.                         
  50.     Pair                ItemMark;  /* Pair used because 'C'     */
  51.                                    /* pads with extra byte      */
  52.                                    /* anyway for even alignment.*/
  53. } Item,  *AddressOfItem;
  54.  
  55. /*
  56.  *   Item Mark Field format:
  57.  *    
  58.  *   Bit 0    = 1 if marked by user, eg. to mark selected items
  59.  *
  60.  *   Bit 1    = 1 if AddressOfData is the address of a list record,
  61.  *                implemented in 'Trees.c' extension -- not included.
  62.  *
  63.  *   Bit 2-15 = available to user
  64.  */
  65.  
  66. /* Mark field masks:     */      
  67. #define    Marked         1
  68. #define    DataIsList (1<<1)  /* Used exclusively by 'Trees.c' */
  69.  
  70. /*------------------------------------------------------------
  71. | NAME: GetItemDataAddress
  72. |
  73. | PURPOSE: To get the address of the data for the given item.
  74. |
  75. | DESCRIPTION: 
  76. |
  77. | EXAMPLE:  WhereDataIs = GetItemDataAddress(AnItem);
  78. |
  79. | NOTE: 
  80. |
  81. | ASSUMES: 
  82. |
  83. | HISTORY: 10.26.93 by Lee Malone
  84. |
  85. ------------------------------------------------------------*/
  86. #define GetItemDataAddress(I) (I->AddressOfData) 
  87.  
  88. /*------------------------------------------------------------
  89. | NAME: GetNextItem
  90. |
  91. | PURPOSE: To get the address of the item following the given 
  92. |          item.
  93. |
  94. | DESCRIPTION: If no item follows the given item then 0 is
  95. | returned as the address.
  96. |
  97. | EXAMPLE:  
  98. |
  99. | NOTE: 
  100. |
  101. | ASSUMES: 
  102. |
  103. | HISTORY: 10.26.93 by Lee Malone
  104. |
  105. ------------------------------------------------------------*/
  106. #define GetNextItem(I) (I->AddressOfNextItem)  
  107.  
  108. /*------------------------------------------------------------
  109. | NAME: GetPriorItem
  110. |
  111. | PURPOSE: To get the address of the item preceeding the given 
  112. |          item.
  113. |
  114. | DESCRIPTION: If no item preceeds the given item then 0 is
  115. | returned as the address.
  116. |
  117. | EXAMPLE:  
  118. |
  119. | NOTE: 
  120. |
  121. | ASSUMES: 
  122. |
  123. | HISTORY: 10.26.93 by Lee Malone
  124. |
  125. ------------------------------------------------------------*/
  126. #define GetPriorItem(I) (I->AddressOfPriorItem)
  127.  
  128. /*------------------------------------------------------------
  129. | NAME: GetItemMark
  130. |
  131. | PURPOSE: To get the mark code of the given item.
  132. |
  133. | DESCRIPTION: 
  134. |
  135. | EXAMPLE:  
  136. |
  137. | NOTE: 
  138. |
  139. | ASSUMES: 
  140. |
  141. | HISTORY: 10.26.93 by Lee Malone
  142. |
  143. ------------------------------------------------------------*/
  144. #define GetItemMark(I) (I->ItemMark)
  145.  
  146. /*------------------------------------------------------------
  147. | NAME: PutItemDataAddress
  148. |
  149. | PURPOSE: To put the data address into the given item.
  150. |
  151. | DESCRIPTION: 
  152. |
  153. | EXAMPLE:  
  154. |
  155. | NOTE: 
  156. |
  157. | ASSUMES: 
  158. |
  159. | HISTORY: 10.26.93 by Lee Malone
  160. |
  161. ------------------------------------------------------------*/
  162. #define PutItemDataAddress(I,D) (I->AddressOfData = D) 
  163.  
  164. /*------------------------------------------------------------
  165. | NAME: PutItemMark
  166. |
  167. | PURPOSE: To put the item mark code into the given item.
  168. |
  169. | DESCRIPTION: 
  170. |
  171. | EXAMPLE:  
  172. |
  173. | NOTE: 
  174. |
  175. | ASSUMES: 
  176. |
  177. | HISTORY: 10.27.93 by Lee Malone
  178. |
  179. ------------------------------------------------------------*/
  180. #define PutItemMark(I,S) (I->ItemMark = S)
  181.  
  182. /*------------------------------------------------------------
  183. | NAME: PutNextItem
  184. |
  185. | PURPOSE: To put the item address of the following item into
  186. |          given item.
  187. |
  188. | DESCRIPTION: 
  189. |
  190. | EXAMPLE:  
  191. |
  192. | NOTE: 
  193. |
  194. | ASSUMES: 
  195. |
  196. | HISTORY: 10.27.93 by Lee Malone
  197. |
  198. ------------------------------------------------------------*/
  199. #define PutNextItem(I,N) (I->AddressOfNextItem = N) 
  200.  
  201. /*------------------------------------------------------------
  202. | NAME: PutPriorItem
  203. |
  204. | PURPOSE: To put the item address of the preceeding item into
  205. |          the given item.
  206. |
  207. | DESCRIPTION: 
  208. |
  209. | EXAMPLE:  
  210. |
  211. | NOTE: 
  212. |
  213. | ASSUMES: 
  214. |
  215. | HISTORY: 10.27.93 by Lee Malone
  216. |
  217. ------------------------------------------------------------*/
  218. #define PutPriorItem(I,P) (I->AddressOfPriorItem = P) 
  219.  
  220. /*------------------------------------------------------------
  221. | NAME: TheDataAddress
  222. |
  223. | PURPOSE: To refer to the address of the data associated with 
  224. |          the current item.
  225. |
  226. | DESCRIPTION: 
  227. |
  228. | EXAMPLE:  a = TheDataAddress;
  229. |
  230. | NOTE: The address of the current item is held in 'TheItem'.
  231. |
  232. | ASSUMES: 
  233. |
  234. | HISTORY: 10.27.93 by Lee Malone
  235. |
  236. ------------------------------------------------------------*/
  237. #define TheDataAddress    (TheItem->AddressOfData)
  238.  
  239. /*------------------------------------------------------------
  240. | NAME: TheNextItem
  241. |
  242. | PURPOSE: To refer to the address of the item following 
  243. |          the current item.
  244. |
  245. | DESCRIPTION: If no item follows the current item then 0 is
  246. | returned as the address.
  247. |
  248. | EXAMPLE:  next = TheNextItem;
  249. |
  250. | NOTE: The address of the current item is held in 'TheItem'.
  251. |
  252. | ASSUMES: 
  253. |
  254. | HISTORY: 10.27.93 by Lee Malone
  255. |
  256. ------------------------------------------------------------*/
  257. #define    TheNextItem        (TheItem->AddressOfNextItem)
  258.  
  259. /*------------------------------------------------------------
  260. | NAME: ThePriorItem
  261. |
  262. | PURPOSE: To refer to the address of the item preceeding the 
  263. |          current item.
  264. |
  265. | DESCRIPTION: If no item preceeds the current item then 0 is
  266. | returned as the address.
  267. |
  268. | EXAMPLE:  
  269. |
  270. | NOTE: The address of the current item is held in 'TheItem'.
  271. |
  272. | ASSUMES: 
  273. |
  274. | HISTORY: 10.26.93 by Lee Malone
  275. |
  276. ------------------------------------------------------------*/
  277. #define ThePriorItem    (TheItem->AddressOfPriorItem)
  278.  
  279. /*------------------------------------------------------------
  280. | NAME: TheItemMark
  281. |
  282. | PURPOSE: To refer to the mark code of the current item.
  283. |
  284. | DESCRIPTION: 
  285. |
  286. | EXAMPLE:  mark = TheItemMark;
  287. |
  288. | NOTE: The address of the current item is held in 'TheItem'.
  289. |
  290. | ASSUMES: 
  291. |
  292. | HISTORY: 10.26.93 by Lee Malone
  293. |
  294. ------------------------------------------------------------*/
  295. #define TheItemMark        (TheItem->ItemMark)
  296.  
  297. /*************************************************************/
  298. /*               T H E   L I S T   R E C O R D               */
  299. /*************************************************************/
  300.  
  301. typedef struct ListRecord
  302. {
  303.     AddressOfItem   AddressOfFirstItem;
  304.     AddressOfItem   AddressOfLastItem;
  305.     Quad            ItemCount;
  306.     Pair            ListMark; /* Pair used because C pads */
  307.                               /* with extra byte for even */ 
  308.                               /* alignment anyway.        */        
  309. } List,  *AddressOfList;
  310.  
  311. /*
  312.  *   List Mark Field format:
  313.  *    
  314.  *   Bit 0    = 1 if marked by user, eg. to mark selected lists
  315.  *
  316.  *   Bit 1-15 = available to user
  317.  */
  318.  
  319. /* List Mark Bit field Masks */
  320. /* #define    Marked         1 -- defined above */
  321.  
  322. /*------------------------------------------------------------
  323. | NAME: AddToListItemCount
  324. |
  325. | PURPOSE: To add a value to the item count into the given 
  326. |          list record.
  327. |
  328. | DESCRIPTION: 
  329. |
  330. | EXAMPLE:  AddToListItemCount(NameList,1);
  331. |
  332. | NOTE: 
  333. |
  334. | ASSUMES: 
  335. |
  336. | HISTORY: 10.28.93 by Lee Malone
  337. |
  338. ------------------------------------------------------------*/
  339. #define AddToListItemCount(L,C)    (L->ItemCount += (Quad) C)
  340.  
  341. /*------------------------------------------------------------
  342. | NAME: GetFirstItemOfList
  343. |
  344. | PURPOSE: To get the address of the first item of the 
  345. |          given list.
  346. |
  347. | DESCRIPTION: 
  348. |
  349. | EXAMPLE:  AnItem = GetFirstItemOfList(NameList);
  350. |
  351. | NOTE: 
  352. |
  353. | ASSUMES: 
  354. |
  355. | HISTORY: 10.28.93 by Lee Malone
  356. |
  357. ------------------------------------------------------------*/
  358. #define GetFirstItemOfList(L)    (L->AddressOfFirstItem)
  359.  
  360. /*------------------------------------------------------------
  361. | NAME: GetLastItemOfList
  362. |
  363. | PURPOSE: To get the address of the last item of the 
  364. |          given list.
  365. |
  366. | DESCRIPTION: 
  367. |
  368. | EXAMPLE:  AnItem = GetLastItemOfList(NameList);
  369. |
  370. | NOTE: 
  371. |
  372. | ASSUMES: 
  373. |
  374. | HISTORY: 10.27.93 by Lee Malone
  375. |
  376. ------------------------------------------------------------*/
  377. #define GetLastItemOfList(L)    (L->AddressOfLastItem)
  378.  
  379. /*------------------------------------------------------------
  380. | NAME: GetListItemCount
  381. |
  382. | PURPOSE: To get the count of items in the given list.
  383. |
  384. | DESCRIPTION: 
  385. |
  386. | EXAMPLE:  HowMany = GetListItemCount(NameList);
  387. |
  388. | NOTE: 
  389. |
  390. | ASSUMES: 
  391. |
  392. | HISTORY: 10.27.93 by Lee Malone
  393. |
  394. ------------------------------------------------------------*/
  395. #define GetListItemCount(L)    (L->ItemCount)
  396.  
  397. /*------------------------------------------------------------
  398. | NAME: GetListMark
  399. |
  400. | PURPOSE: To get the mark code of the given list.
  401. |
  402. | DESCRIPTION: 
  403. |
  404. | EXAMPLE:  mark = GetListMark(NameList);
  405. |
  406. | NOTE: 
  407. |
  408. | ASSUMES: 
  409. |
  410. | HISTORY: 10.28.93 by Lee Malone
  411. |
  412. ------------------------------------------------------------*/
  413. #define GetListMark(L)        (L->ListMark)
  414.  
  415. /*------------------------------------------------------------
  416. | NAME: PutFirstItemOfList
  417. |
  418. | PURPOSE: To put the address of the first item into the 
  419. |          given list record.
  420. |
  421. | DESCRIPTION: 
  422. |
  423. | EXAMPLE:  PutFirstItemOfList(NameList,AnItem);
  424. |
  425. | NOTE: 
  426. |
  427. | ASSUMES: 
  428. |
  429. | HISTORY: 10.28.93 by Lee Malone
  430. |
  431. ------------------------------------------------------------*/
  432. #define PutFirstItemOfList(L,I)    (L->AddressOfFirstItem = I)
  433.  
  434. /*------------------------------------------------------------
  435. | NAME: PutLastItemOfList
  436. |
  437. | PURPOSE: To put the address of the last item into the 
  438. |          given list record.
  439. |
  440. | DESCRIPTION: 
  441. |
  442. | EXAMPLE:  PutLastItemOfList(NameList,AnItem);
  443. |
  444. | NOTE: 
  445. |
  446. | ASSUMES: 
  447. |
  448. | HISTORY: 10.28.93 by Lee Malone
  449. |
  450. ------------------------------------------------------------*/
  451. #define PutLastItemOfList(L,I)    (L->AddressOfLastItem = I)
  452.  
  453. /*------------------------------------------------------------
  454. | NAME: PutListItemCount
  455. |
  456. | PURPOSE: To put the item count into the given list record.
  457. |
  458. | DESCRIPTION: 
  459. |
  460. | EXAMPLE:  PutListItemCount(NameList,5);
  461. |
  462. | NOTE: 
  463. |
  464. | ASSUMES: 
  465. |
  466. | HISTORY: 10.28.93 by Lee Malone
  467. |
  468. ------------------------------------------------------------*/
  469. #define PutListItemCount(L,C)    (L->ItemCount = C)
  470.  
  471. /*------------------------------------------------------------
  472. | NAME: PutListMark
  473. |
  474. | PURPOSE: To put the list mark code into the given list.
  475. |
  476. | DESCRIPTION: 
  477. |
  478. | EXAMPLE:  PutListMark(NameList,Marked);
  479. |
  480. | NOTE: 
  481. |
  482. | ASSUMES: 
  483. |
  484. | HISTORY: 10.27.93 by Lee Malone
  485. |
  486. ------------------------------------------------------------*/
  487. #define PutListMark(L,M) (L->ListMark = M)
  488.  
  489.  
  490. /*------------------------------------------------------------
  491. | NAME: TheItemCount
  492. |
  493. | PURPOSE: To refer to the item count of the current list.
  494. |
  495. | DESCRIPTION: 
  496. |
  497. | EXAMPLE:  CountOfItems = TheItemCount;
  498. |
  499. | NOTE: The address of the current list is held in 'TheList'.
  500. |
  501. | ASSUMES: 
  502. |
  503. | HISTORY: 10.27.93 by Lee Malone
  504. |
  505. ------------------------------------------------------------*/
  506. #define TheItemCount        (TheList->ItemCount)
  507.  
  508. /*------------------------------------------------------------
  509. | NAME: TheFirstItem
  510. |
  511. | PURPOSE: To refer to the address of the first item of the 
  512. |          current list.
  513. |
  514. | DESCRIPTION: 
  515. |
  516. | EXAMPLE:  AnItem = TheFirstItem;
  517. |
  518. | NOTE: The address of the current list is held in 'TheList'.
  519. |
  520. | ASSUMES: 
  521. |
  522. | HISTORY: 10.27.93 by Lee Malone
  523. |
  524. ------------------------------------------------------------*/
  525. #define TheFirstItem        (TheList->AddressOfFirstItem)
  526.  
  527. /*------------------------------------------------------------
  528. | NAME: TheLastItem
  529. |
  530. | PURPOSE: To refer to the address of the last item of the 
  531. |          current list.
  532. |
  533. | DESCRIPTION: 
  534. |
  535. | EXAMPLE:  AnItem = TheLastItem;
  536. |
  537. | NOTE: The address of the current list is held in 'TheList'.
  538. |
  539. | ASSUMES: 
  540. |
  541. | HISTORY: 10.27.93 by Lee Malone
  542. |
  543. ------------------------------------------------------------*/
  544. #define TheLastItem            (TheList->AddressOfLastItem)
  545.  
  546. /*------------------------------------------------------------
  547. | NAME: TheListMark
  548. |
  549. | PURPOSE: To refer to the mark code of the current list.
  550. |
  551. | DESCRIPTION: 
  552. |
  553. | EXAMPLE:  mark = TheListMark;
  554. |
  555. | NOTE: The address of the current list is held in 'TheList'.
  556. |
  557. | ASSUMES: 
  558. |
  559. | HISTORY: 10.27.93 by Lee Malone
  560. |
  561. ------------------------------------------------------------*/
  562. #define TheListMark        (TheList->ListMark)
  563.  
  564.  
  565.  
  566. /*************************************************************/
  567. /*                                                           */
  568. /*            D I R E C T   A C C E S S   T A B L E          */
  569. /*                                                           */
  570. /* A Direct Access Table is just an array of item record     */
  571. /* addresses.                                                */
  572. /*                                                           */
  573. /* Normally a linked list is accessed sequentially but there */
  574. /* are some situations where direct access of items in any   */
  575. /* order is needed.  A direct access table can be            */
  576. /* made from a list to give direct access to any item via    */
  577. /* its offset in the direct access table.                    */
  578. /*                                                           */
  579. /* For speed, some sorting and searching procedures first    */
  580. /* build a direct access table if the number of items in the */
  581. /* list is above a certain threshold.                        */
  582. /*                                                           */
  583. /*************************************************************/
  584.  
  585. extern    Quad     DirectAccessTableThreshold;
  586.         /* Quantity of items, above which a direct */
  587.         /* access table is used to sort them.      */
  588.  
  589.  
  590. typedef AddressOfItem          *AddressOfAddressOfItem; 
  591.  
  592. extern    Quad     MaximumLists;
  593. extern    Quad     MaximumItems;
  594.  
  595. /* Where lists and items are stored in memory. */
  596. extern    AddressOfList     ListSpace; 
  597. extern    AddressOfItem     ItemSpace;
  598.  
  599. extern    Quad              CountOfFreeLists;
  600. extern    Quad              CountOfFreeItems;
  601. extern    Quad              MaxCountOfLists;
  602. extern    Quad              MaxCountOfItems;
  603. extern    AddressOfList     FirstFreeList;
  604. extern    AddressOfItem     FirstFreeItem;
  605. extern    AddressOfList     TheList;
  606. extern    AddressOfItem     TheItem;
  607. extern    Quad              TheListStack[];
  608. extern    Quad              TheListStackIndex;
  609. extern    Pair              TheListSystemIsSetUp;
  610.  
  611. /* -------------------PROTOTYPES----------------------------- */
  612. /* 
  613.    Operations implemented using the preceeding #define 
  614.    statements are included below within comments for reference.
  615. */
  616.  
  617. /* Nothing   AddToListItemCount(AddressOfList,Quad);         */
  618.  
  619. AddressOfAddressOfItem  BuildDirectAccessTableForList(AddressOfList);
  620. Nothing          CleanUpTheListSystem(Nothing);
  621. AddressOfList    CreateList(Nothing);
  622. AddressOfItem    CreateItem(Nothing);
  623. AddressOfItem    CreateItemForData(AddressOfByte);
  624.  
  625. Nothing          DeleteAllReferencesToData(AddressOfList,AddressOfByte);
  626. AddressOfItem    DeleteFirstReferenceToData(AddressOfList,AddressOfByte);
  627. Nothing          DeleteList(AddressOfList);
  628. Nothing          DeleteListOfDynamicData(AddressOfList);
  629. Nothing          DeleteItem(AddressOfItem);
  630. Nothing          DeleteMarkedItems(AddressOfList);
  631.  
  632. AddressOfList    DuplicateList(AddressOfList);
  633. AddressOfList    DuplicateMarkedItems(AddressOfList);
  634. Nothing          ExchangeItems(AddressOfList,AddressOfItem,AddressOfItem);
  635. AddressOfItem    ExtractItemFromList(AddressOfList,AddressOfItem);
  636. AddressOfItem    ExtractFirstItemFromList(AddressOfList);
  637. AddressOfItem    ExtractLastItemFromList(AddressOfList);
  638. AddressOfList    ExtractMarkedItems(AddressOfList);
  639. AddressOfItem    ExtractTheItem(Nothing);
  640. AddressOfItem    FindFirstItemLinkedToData(AddressOfList,AddressOfByte);
  641. AddressOfItem    FindFirstMatchingItem(AddressOfList, Pair, Pair, AddressOfByte);
  642. AddressOfItem    FindPlaceInOrderedList(AddressOfList,
  643.                                         AddressOfByte,
  644.                                         AddressOfComparisonProcedure);
  645. AddressOfAddressOfItem    FindPlaceInOrderedDirectAccessTable(AddressOfAddressOfItem,
  646.                                         Quad,
  647.                                         AddressOfByte,
  648.                                         AddressOfComparisonProcedure);
  649. AddressOfItem    FindNextMatchingItem(AddressOfList, 
  650.                                       AddressOfItem, 
  651.                                       Pair, 
  652.                                       Pair, 
  653.                                       AddressOfByte);
  654. AddressOfItem    FindFirstMarkedItem(AddressOfList);
  655. AddressOfItem    FindFirstUnMarkedItem(AddressOfList);
  656. Quad             FindIndexOfFirstMarkedItem(AddressOfList);
  657.  
  658. /* Operations used to get values from Item records:   */
  659. /* AddressOfByte   GetItemDataAddress(AddressOfItem); */
  660. /* AddressOfItem   GetNextItem(AddressOfItem);        */
  661. /* AddressOfItem   GetPriorItem(AddressOfItem);       */
  662. /* Pair            GetItemMark(AddressOfItem);        */
  663.  
  664. /* Operations used to get values from List records:   */
  665. /* Quad            GetListItemCount(AddressOfList);   */
  666. /* AddressOfItem   GetFirstItemOfList(AddressOfList); */
  667. /* AddressOfItem   GetLastItemOfList(AddressOfList);  */
  668. /* Pair            GetListMark(AddressOfList);        */
  669.  
  670. Nothing          InsertItemAfterItemInList(AddressOfList,AddressOfItem,AddressOfItem);
  671. Nothing          InsertItemBeforeItemInList(AddressOfList,AddressOfItem,AddressOfItem);
  672. Nothing          InsertItemFirstInList(AddressOfList,AddressOfItem);
  673. Nothing          InsertItemLastInList(AddressOfList,AddressOfItem);
  674.  
  675. AddressOfItem    InsertDataAfterItemInList(AddressOfList,AddressOfItem,AddressOfByte);
  676. AddressOfItem    InsertDataBeforeItemInList(AddressOfList,AddressOfItem,AddressOfByte);
  677. AddressOfItem    InsertDataFirstInList(AddressOfList,AddressOfByte);
  678. AddressOfItem    InsertDataInOrderedList(AddressOfList,AddressOfByte,
  679.                                          AddressOfComparisonProcedure);
  680. AddressOfItem    InsertDataLastInList(AddressOfList,AddressOfByte);
  681.  
  682. Truth            IsAnyItemMarkedInList(AddressOfList);
  683. Truth            IsAnyItemsInList(AddressOfList);
  684. Truth            IsItemAlone(AddressOfItem);
  685. Truth            IsItemCreationPossible(Nothing);
  686. Truth            IsItemFirst(AddressOfItem);
  687. Truth            IsItemLast(AddressOfItem);
  688. Truth            IsItemMarked(AddressOfItem);
  689. Truth            IsListCreationPossible(Nothing);
  690. Truth            IsListMarked(AddressOfList);
  691. Truth            IsTheDataMatching(Pair,Pair,AddressOfByte);
  692.  
  693. Nothing          JoinLists(AddressOfList,AddressOfList);
  694. Nothing          MarkItem(AddressOfItem);
  695. Nothing          MarkItemAsFirst(AddressOfItem);
  696. Nothing          MarkItemAsLast(AddressOfItem);
  697. Nothing          MarkList(AddressOfList);
  698. Nothing          MarkListAsEmpty(AddressOfList);
  699. Nothing          OutputListOfStrings(AddressOfList, FILE*);
  700. Nothing          OutputListSystemStatus(FILE*);
  701. Nothing          PullTheItem(Nothing);
  702. Nothing          PullTheList(Nothing);
  703. Nothing          PullTheListAndItem(Nothing);
  704. Nothing          PushTheList(Nothing);
  705. Nothing          PushTheListAndItem(Nothing);
  706. Nothing          PushTheItem(Nothing);
  707.  
  708. /* Operations used to put values into Item records:               */
  709. /* Nothing       PutItemDataAddress(AddressOfItem,AddressOfByte); */
  710. /* Nothing       PutItemMark(AddressOfItem,Pair);                 */
  711. /* Nothing       PutNextItem(AddressOfItem,AddressOfItem);        */
  712. /* Nothing       PutPriorItem(AddressOfItem,AddressOfItem);       */
  713.  
  714. /* Operations used to put values into List records:               */
  715. /* Nothing       PutFirstItemOfList(AddressOfList,AddressOfItem); */
  716. /* Nothing       PutLastItemOfList(AddressOfList,AddressOfItem);  */
  717. /* Nothing       PutListItemCount(AddressOfList,Quad);            */
  718. /* Nothing       PutListMark(AddressOfList,Pair);                 */
  719.  
  720. Nothing          ReorderListToMatchDirectAccessTable(AddressOfList,AddressOfAddressOfItem);
  721. Nothing          ReverseList(AddressOfList);
  722. Nothing          SetUpTheListSystem(Quad, Quad);
  723. Nothing          SortDirectAccessTable(AddressOfAddressOfItem, 
  724.                                        Quad, 
  725.                                        AddressOfComparisonProcedure);        
  726. Nothing          SortList(AddressOfList,AddressOfComparisonProcedure);
  727. Nothing          SortListAlphabetically(AddressOfList);
  728. Nothing          SortListDescending(AddressOfList,AddressOfComparisonProcedure);
  729. Nothing          SortListViaDirectAccessTable(AddressOfList,AddressOfComparisonProcedure);
  730. Nothing          SortShortList(AddressOfList,AddressOfComparisonProcedure);
  731.  
  732. /* Fields of the current item:         */                                               
  733. /* AddressOfByte   TheDataAddress;     */
  734. /* AddressOfItem   TheNextItem;        */
  735. /* AddressOfItem   ThePriorItem;       */
  736. /* Pair            TheItemMark;        */
  737.  
  738. /* Fields of the current list:         */                                               
  739. /*  Quad           TheItemCount;       */
  740. /*  AddressOfItem  TheFirstItem;       */
  741. /*  AddressOfItem  TheLastItem;        */
  742. /*  Pair           TheListMark;        */
  743.  
  744. Nothing          ToFirstItem(Nothing);
  745. Nothing          ToLastItem(Nothing);
  746. Nothing          ToNextItem(Nothing);
  747. Nothing          ToPriorItem(Nothing);
  748. Nothing          UnMarkAllItemsInList(AddressOfList);
  749. Nothing          UnMarkList(AddressOfList);
  750. Nothing          UnMarkItem(AddressOfItem);
  751.  
  752.  
  753. #endif
  754.